//字符串字面量类型用来约束取值只能是几个字符串中的一个 
type EventNames = 'click' | 'scroll'|'mousemove';
function handleEvent(ele:Element|null,event:EventNames){

}
handleEvent(document.getElementById('hello'),'scroll')
// handleEvent(document.getElementById('hello'),'dbclick')
